import os
from utils import text_to_sequence
import numpy as np
from pre_process import random_string


if __name__ == "__main__":
    num_tests = 10000
    losses = []
    for i in range(num_tests):
        x1 = random_string()
        x1 = text_to_sequence(x1)
        x1 = np.array(x1, dtype=np.float)
        # print(x1.shape)
        x2 = random_string()
        x2 = text_to_sequence(x2)
        x2 = np.array(x2, dtype=np.float)
        loss = (np.square(x1 - x2)).mean()
        losses.append(loss)

    print(np.mean(losses))

